﻿<%@ Page Title="Venda" Language="C#" MasterPageFile="~/gymmaster.Master" AutoEventWireup="true"
    CodeBehind="Venda.aspx.cs" Inherits="GymMaster.View.Venda.Venda" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:UpdatePanel runat="server" ID="UpdatePanel" UpdateMode="Conditional">
        <ContentTemplate>
            <table cellpadding="5" cellspacing="0" class="table" style="border-collapse: collapse;"
                align="center">
                <tr>
                    <td style="width: 78%">
                        <table border="1" style="width: 98%;">
                            <tr>
                                <td rowspan="4" style="width: 138px">
                                    foto
                                </td>
                                <td style="height: 35px; width: 740px;" align="left">
                                    Qtde:
                                    <asp:TextBox ID="txtQtde" AutoPostBack="true" runat="server" class="codBarras" Width="80%"
                                        MaxLength="299" Style="font-size: large; font-family: Monotype Corsiva; color: #000066;
                                        border: 0px; background-color: #DCDCDC;" Height="90%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 35px; width: 740px;" align="left">
                                    Código Barras: &nbsp;&nbsp;
                                    <asp:TextBox ID="txtCodigoBarra" AutoPostBack="true" runat="server" class="codBarras"
                                        Width="80%" MaxLength="299" Style="font-size: large; font-family: Monotype Corsiva;
                                        color: #000066; border: 0px; background-color: #DCDCDC;" Height="90%" OnTextChanged="EventHandler"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 35px; width: 740px;" align="left">
                                    Produto:
                                    <asp:Label ID="lblProduto" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 35px; width: 740px;" align="left">
                                    Valor:
                                    <asp:Label ID="lblValor" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" style="height: 35px" align="left">
                                    Data Validade:
                                    <asp:Label ID="lblDataValidade" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" style="height: 35px" align="left">
                                    Unid Medida:
                                    <asp:Label ID="lblUnidMed" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" style="height: 35px" align="left">
                                    Descrição:
                                    <asp:Label ID="lblDescricao" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td align="center">
                        <asp:Table ID="Table1" runat="server" BorderWidth="1px" Style="margin-left: 0px;"
                            Width="268px">
                            <asp:TableRow>
                                <asp:TableCell>
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl1" runat="server" Text="Produto - Qtde x Valor"></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt2" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl2" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt3" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl3" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt4" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl4" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt5" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl5" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt6" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl6" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt7" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl7" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:ImageButton ID="ibt8" runat="server" ImageUrl="~/images/remove.png" Height="17px"
                                        Width="17px" OnClick="ibt_Click" />
                                </asp:TableCell>
                                <asp:TableCell Width="90%">
                                    <asp:Label ID="lbl8" runat="server" Text=""></asp:Label>
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </td>
                </tr>
                <!-- Observacao -->
                <tr>
                    <td align="center" style="width: 78%; height: 100px;">
                        <asp:Button ID="bntFinalizar" runat="server" CssClass="button" Text="Finalizar" OnClick="bntFinalizar_Click" />
                        &nbsp&nbsp&nbsp&nbsp&nbsp
                        <asp:Button ID="btnCancelar" runat="server" CommandName="Submit" CssClass="button"
                            Text="Cancelar" ValidationGroup="CreateUserWizard1" OnClientClick="return confirm('Deseja cancelar a compra?');"
                            OnClick="btnCancelar_Click" />
                    </td>
                    <td align="center" style="height: 100px;">
                        <font color="red" size="5px">Valor Total: </font>
                        <asp:Label ID="lblTotal" runat="server" Text="" ForeColor="Red" Font-Size="30px"></asp:Label>
                    </td>
                </tr>
            </table>
            <!-- Finalizar venda -->
            <asp:Label ID="lblTeste" runat="server"></asp:Label>
            <asp:Panel CssClass="modalPopUp" ID="pnlPopUp" Style="display: none;" runat="server">
                <div>
                    <table runat="server">
                        <tr>
                            <td align="center" colspan="2">
                                <asp:ListBox ID="lbxFormaPagamento" runat="server" Width="90%" AutoPostBack="True"
                                    OnSelectedIndexChanged="lbxFormaPagamento_SelectedIndexChanged">
                                    <asp:ListItem>Dinheiro</asp:ListItem>
                                    <asp:ListItem>Cartão Debito</asp:ListItem>
                                    <asp:ListItem>Cartão Crédito</asp:ListItem>
                                </asp:ListBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <br />
                                Valor Total:
                            </td>
                            <td>
                                <asp:Label ID="lblTotalPagamento" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                Valor Recebido:
                            </td>
                            <td>
                                <asp:TextBox ID="txtRecebidoPagamento" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                Forma Pagamento:
                            </td>
                            <td>
                                <asp:Label ID="lblFormaPagamento" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <br />
                                <asp:Label ID="lblTroco" runat="server" Text="Troco: " Visible="false" Style="color:Red; font-style:inherit"></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="lblTrocoPagamento" runat="server" Text="" Visible="false" Style="color:Red; font-style:inherit"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="titletable" colspan="2">
                                <br />
                                <asp:Button ID="btnFinalizarPagamento" runat="server" CssClass="button" Text="Finalizar"
                                    OnClick="btnFinalizarPagamento_Click" />
                                <asp:Button ID="btnCancelarPagamento" runat="server" CssClass="button" Text="Cancelar" />
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
            <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground"
                CancelControlID="btnCancelarPagamento" DropShadow="true" PopupControlID="pnlPopUp"
                PopupDragHandleControlID="panel3" TargetControlID="lblTeste">
            </asp:ModalPopupExtender>
            <asp:Panel ID="Panel1" runat="server">
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
